/**
 * 功能组件渲染器
 */
import {StyleValue} from "vue"
import {BaseRender} from "./base-render.ts"
import {ElButton} from "../components/element/index.ts";

/**
 * 功能组件
 */
type ProgramComponents<Prop> = ElButton<Prop>

/**
 * 功能组件接口
 */
export interface ProgramRender<EType, Prop, Props> extends BaseRender<Prop> {
    eType?: EType
    props?: Partial<Props>
    events?: string
    style?: Partial<StyleValue>
    event?: string
    isShow?: () => boolean
    isDisable?: () => boolean
}

/**
 * 功能组件列表
 */
export type ProgramEls<Prop> = ProgramComponents<Prop> | BaseRender<Prop>
